﻿<Page x:Class="SqlMetalIncludeGUI.SqlMetalConfig"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:Me="clr-namespace:SqlMetalIncludeGUI"
      x:Name="_this"
    WindowTitle="SqlMetalConfig">
    <Page.Resources>
        <Me:Config x:Key="Config" />
    </Page.Resources>
    <DockPanel>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" DockPanel.Dock="Bottom">
            <Button Margin="5" Content="Re-run SqlMetal" x:Name="RegenDbml" Click="RegenDbml_Click" Visibility="Collapsed" />
            <Button Margin="5" Content="Continue" x:Name="NextButton" Click="NextButton_Click" />
        </StackPanel>
        <GroupBox Header="SqlMetal Configuration" DockPanel.Dock="Top">
            <StackPanel>
                <CheckBox 
                    Content="Include Views" 
                    Margin="5,5,0,5"
                    IsChecked="{Binding Source={StaticResource Config}, Path=Default.SqlMetalIncludeViews, UpdateSourceTrigger=PropertyChanged}"
                    />
                <CheckBox 
                    Content="Include Stored Procedures" 
                    Margin="5,0,5,5"
                    IsChecked="{Binding Source={StaticResource Config}, Path=Default.SqlMetalIncludeSprocs, UpdateSourceTrigger=PropertyChanged}"
                    />
                <CheckBox 
                    Content="Pluralise " 
                    Margin="5,0,5,5"
                    IsChecked="{Binding Source={StaticResource Config}, Path=Default.SqlMetalPluralise, UpdateSourceTrigger=PropertyChanged}"
                    ToolTip="Automatically pluralise or singularise class and member names using English language rules."
                    />
                <DockPanel>
                    <TextBlock Text="SqlMetal output name: " DockPanel.Dock="Left" VerticalAlignment="Center" Margin="10,0,0,0" />
                    <TextBox Text="{Binding Source={StaticResource Config}, Path=Default.SqlMetalOutput, UpdateSourceTrigger=PropertyChanged}" />
                </DockPanel>
            </StackPanel>
        </GroupBox>
        <GroupBox Header="SqlMetal output" Visibility="Collapsed" x:Name="sqlMetalOutputGroup">
            <DockPanel>
                <TextBox Background="Black" Foreground="White" x:Name="sqlMetalOutput" TextWrapping="WrapWithOverflow" IsReadOnly="True" />
            </DockPanel>
        </GroupBox>
    </DockPanel>
</Page>
